package com.design.pattern.command.projection;

import java.util.ArrayList;
import java.util.List;

public class Client {
    public static void main(String[] args) {
        //将学生集合在操场上
        Student xiaoMing=new Student("xiaoMing");
        Student xiaoHong=new Student("xiaoHong");
        Student xiaoHua=new Student("xiaoHua");
        Student xiaoHei=new Student("xiaoHei");
        List<Student> students=new ArrayList<>();
        students.add(xiaoMing);
        students.add(xiaoHong);
        students.add(xiaoHua);
        students.add(xiaoHei);
        Loudspeaker loudspeaker=new Loudspeaker(students);
        //支持人就位,拿起话筒并准备好台词
        Host host=new Host(loudspeaker,"广播体操");
        //主持人通过喇叭告知大家开始做广播体操
        host.sendCommand();
    }
}
